<template>
    <div>
        <a-form-model :model="newFormData" >
            <a-tabs default-active-key="1">
                <a-tab-pane key="1" tab="基本信息">
                    <a-descriptions bordered :column="{ xs: 12, sm: 16, md: 3}" size="small">
                        <a-descriptions-item label="姓名">
                            {{newFormData.fullName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="证件类型">
                            {{newFormData.cardTypeName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="身份证">
                            {{newFormData.idcard}}
                        </a-descriptions-item>
                        <a-descriptions-item label="性别">
                            {{newFormData.sexName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="出生日期">
                            {{newFormData.birthday}}
                        </a-descriptions-item>
                        <a-descriptions-item label="电子邮箱">
                            {{newFormData.email}}
                        </a-descriptions-item>
                        <a-descriptions-item label="手机号码">
                            {{newFormData.cellphone}}
                        </a-descriptions-item>
                        <a-descriptions-item label="国家">
                            {{newFormData.countryName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="常住地地址">
                            {{newFormData.addressDetail}}
                        </a-descriptions-item>
                        <a-descriptions-item label="统筹区">
                            {{newFormData.areaName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="证件有效期开始">
                            {{newFormData.cardDateStart}}
                        </a-descriptions-item>
                        <a-descriptions-item label="证件有效期结束">
                            {{newFormData.cardDateEnd}}
                        </a-descriptions-item>
                        <a-descriptions-item label="专长">
                            {{newFormData.expertise}}
                        </a-descriptions-item>
                        <a-descriptions-item label="宗教信仰">
                            {{newFormData.faithName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="健康状况">
                            {{newFormData.healthTypeName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="户籍地址">
                            {{newFormData.householdDetail}}
                        </a-descriptions-item>
                        <a-descriptions-item label="婚姻状态">
                            {{newFormData.marriageStatusName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="民族">
                            {{newFormData.nationName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="籍贯">
                            {{newFormData.nativePlace}}
                        </a-descriptions-item>
                        <a-descriptions-item label="政治面貌">
                            {{newFormData.politicalInfoName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="人员状态">
                            {{newFormData.personStatusName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="人员类型">
                            {{newFormData.personTypeName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="联系电话">
                            {{newFormData.phone}}
                        </a-descriptions-item>
                        <a-descriptions-item label="户口性质">
                            {{newFormData.residenceTypeName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="参加工作时间">
                            {{newFormData.workedTime}}
                        </a-descriptions-item>
                        <a-descriptions-item label="工作单位名称">
                            {{newFormData.orgName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="职务">
                            {{newFormData.jobPost}}
                        </a-descriptions-item>
                    </a-descriptions>
                </a-tab-pane>
                <a-tab-pane key="2" tab="人才信息">
                    <a-descriptions bordered :column="{ xs: 12, sm: 16, md: 3}" size="small">
                        <a-descriptions-item label="省统一人才类别">
                            {{newFormData.talentTypeName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="省人才等级" >
                            {{newFormData.talentLevel}}
                        </a-descriptions-item>
                        <a-descriptions-item label="本地人才类别" >
                            {{newFormData.localTypeName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="本地人才等级" >
                            {{newFormData.localLevel}}
                        </a-descriptions-item>
                        <a-descriptions-item label="所属学科" >
                            {{newFormData.subjectName}}
                        </a-descriptions-item>
                        <a-descriptions-item label="研究领域" >
                            {{newFormData.researchField}}
                        </a-descriptions-item>
                        <a-descriptions-item label="人才类别" >
                            {{newFormData.talentCategory}}
                        </a-descriptions-item>
                        <a-descriptions-item label="人才层级" >
                            {{newFormData.talentRank}}
                        </a-descriptions-item>
                    </a-descriptions>
                </a-tab-pane>
                <a-tab-pane key="3" tab="教育经历">
                    <vxe-table
                            class="vxe-table-antd"
                            resizable
                            show-overflow
                            ref="listTable"
                            stripe
                            border
                            highlight-hover-row
                            highlight-current-row
                            highlight-hover-column
                            highlight-current-column
                            highlight-cell
                            height="400"
                            :data="tableData3">
                        <vxe-table-column type="seq" width="80" fixed="left" align="center" title="序号"></vxe-table-column>
                        <vxe-table-column field="degreeDate" title="最高学位授予时间" width="100" align="center"/>
                        <vxe-table-column field="degreeName" title="学位名称" width="100" align="center"/>
                        <vxe-table-column field="degreeOrg" title="最高学位授予单位" width="100" align="center"/>
                        <vxe-table-column field="degreeType" title="学位类型" width="100" align="center"/>
                        <vxe-table-column field="educationCode" title="学历证书编号" width="100" align="center"/>
                        <vxe-table-column field="educationName" title="学历名称" width="100" align="center"/>
                        <vxe-table-column field="educationType" title="学历类型" width="100" align="center"/>
                        <vxe-table-column field="endDate" title="毕业日期" width="100" align="center"/>
                        <vxe-table-column field="goodHonoursFlag" title="是否优秀毕业生" width="100" align="center"/>
                        <vxe-table-column field="leaningType" title="学习形式" width="100" align="center"/>
                        <vxe-table-column field="majorName" title="专业名称" width="100" align="center"/>
                        <vxe-table-column field="overseasFlag" title="是否海外经历" width="100" align="center"/>
                        <vxe-table-column field="reeducationInfo" title="继续教育（培训）情况" width="100" align="center"/>
                        <vxe-table-column field="school" title="毕业学校" width="100" align="center"/>
                        <vxe-table-column field="schoolingLength" title="学制" width="100" align="center"/>
                        <vxe-table-column field="startDate" title="入学日期" width="100" align="center"/>
                    </vxe-table>
                </a-tab-pane>
                <a-tab-pane key="4" tab="工作经历">
                    <vxe-table
                            class="vxe-table-antd"
                            resizable
                            show-overflow
                            ref="listTable"
                            stripe
                            border
                            highlight-hover-row
                            highlight-current-row
                            highlight-hover-column
                            highlight-current-column
                            highlight-cell
                            height="400"
                            :data="tableData4">
                        <vxe-table-column type="seq" width="80" fixed="left" align="center" title="序号"></vxe-table-column>
                        <vxe-table-column field="adminPost" title="行政职务" width="100" align="center"/>
                        <vxe-table-column field="applicationInfo" title="申请诉求" width="100" align="center"/>
                        <vxe-table-column field="contractStartDate" title="劳动合同(聘用合同)开始日期" width="100" align="center"/>
                        <vxe-table-column field="contractEndDate" title="劳动合同(聘用合同)截止日期" width="100" align="center"/>
                        <vxe-table-column field="currentFlag" title="是否当前工作" width="100" align="center"/>
                        <vxe-table-column field="declareInfo" title="申报信息" width="100" align="center"/>
                        <vxe-table-column field="department" title="部门科室" width="100" align="center"/>
                        <vxe-table-column field="entryTime" title="入职日期" width="100" align="center"/>
                        <vxe-table-column field="industryName" title="所属行业" width="100" align="center"/>
                        <vxe-table-column field="jobPosition" title="职位" width="100" align="center"/>
                        <vxe-table-column field="jobPost" title="职务" width="100" align="center"/>
                        <vxe-table-column field="jobRank" title="职级" width="100" align="center"/>
                        <vxe-table-column field="occupationName" title="职业、工种" width="100" align="center"/>
                        <vxe-table-column field="orgAddress" title="单位地址" width="100" align="center"/>
                        <vxe-table-column field="orgContact" title="单位联系人" width="100" align="center"/>
                        <vxe-table-column field="orgName" title="单位名称" width="100" align="center"/>
                        <vxe-table-column field="orgPhone" title="单位联系人电话" width="100" align="center"/>
                        <vxe-table-column field="position" title="从事岗位" width="100" align="center"/>
                        <vxe-table-column field="proveName" title="资格证明材料名称" width="100" align="center"/>
                        <vxe-table-column field="qualificationPost" title="专业技术职务" width="100" align="center"/>
                        <vxe-table-column field="quitTime" title="离职时间" width="100" align="center"/>
                        <vxe-table-column field="resume" title="简历内容" width="100" align="center"/>
                        <vxe-table-column field="socialFlag" title="是否缴纳社会保险" width="100" align="center"/>
                        <vxe-table-column field="superiorsName" title="直接上级姓名" width="100" align="center"/>
                        <vxe-table-column field="unitTypeName" title="单位类型" width="100" align="center"/>
                        <vxe-table-column field="wordDes" title="工作描述" width="100" align="center"/>
                        <vxe-table-column field="workConditions" title="工作业务情况" width="100" align="center"/>
                        <vxe-table-column field="workExperience" title="工作经历" width="100" align="center"/>
                        <vxe-table-column field="workFunction" title="职能" width="100" align="center"/>
                        <vxe-table-column field="workMajor" title="现从事专业" width="100" align="center"/>
                        <vxe-table-column field="workStatusName" title="状态" width="100" align="center"/>
                        <vxe-table-column field="workTypeName" title="工作类型" width="100" align="center"/>
                    </vxe-table>
                </a-tab-pane>
                <a-tab-pane key="5" tab="荣誉称号">
                    <vxe-table
                            class="vxe-table-antd"
                            resizable
                            show-overflow
                            ref="listTable"
                            stripe
                            border
                            highlight-hover-row
                            highlight-current-row
                            highlight-hover-column
                            highlight-current-column
                            highlight-cell
                            height="400"
                            :data="tableData5">
                        <vxe-table-column type="seq" width="80" fixed="left" align="center" title="序号"></vxe-table-column>
                        <vxe-table-column field="grantTime" title="授予时间" width="100" align="center"/>
                        <vxe-table-column field="grantUnit" title="授予单位" width="200" align="center"/>
                        <vxe-table-column field="personTitle" title="称号或头衔名称" width="200" align="center"/>
                        <vxe-table-column field="titleLevel" title="称号级别" width="100" align="center"/>
                    </vxe-table>
                </a-tab-pane>
            </a-tabs>
        </a-form-model>
    </div>
</template>

<script>
    import {queryTalent} from "@/services/system/abs"
    import {getBatchDict} from "@/services/system/api"
    export default {
        name: "TalentQueryForm",
        data(){
            return{
                dictData: [],
                tableData3:[],
                tableData4:[],
                tableData5:[],
                newFormData: {
                    fullName: '',
                    cardTypeName: '',
                    idcard: '',
                    sexName: '',
                    birthday: '',
                    email: '',
                    cellphone: '',
                    countryName: '',
                    educationType: '',
                    major: '',
                    localType: '',
                    localLevel: '',

                    addressStreetValue:'',
                    addressVillageValue:'',
                    addressDetail:'',
                    areaName:'',
                    cardDateStart:'',
                    cardDateEnd:'',
                    expertise:'',
                    faithName:'',
                    healthTypeName:'',
                    householdDetail:'',
                    marriageStatusName:'',
                    nationName:'',
                    nativePlace:'',
                    politicalInfoName:'',
                    personStatusName:'',
                    personTypeName:'',
                    phone:'',
                    residenceTypeName:'',
                    workedTime:'',

                    talentTypeName:'',
                    talentLevel:'',
                    orgName:'',
                    localTypeName:'',
                    jobPost:'',
                    subjectName:'',
                    researchField:'',
                    talentCategory:'',
                    talentRank:''
                },
                personDetailQueryVO:{
                    busNo:null,
                    cardType:'',
                    idcard:'',
                    personId:null
                }
            }
        },
        props: {
            personId: {
                type: Number,
                default: () => {},
                required: false
            }
        },
        created() {
            // 数据初始化
            // 数据字典初始化
            const params = {}
            params.dictFields = 'areaCode,cardType,degreeType,educationType,sex,country,educationType,major'
            this.$http.post(getBatchDict, params).then(res => {
                this.dictData = res.result
            })
            this.personDetailQueryVO.personId=this.personId
            this.queryDetail()
        },
        methods: {
            queryDetail() {
                this.$http.post(queryTalent, this.personDetailQueryVO).then((res) => {
                    const data = res.result
                    this.newFormData = data
                    this.tableData3=data.educationList
                    this.tableData4=data.workList
                    this.tableData5=data.userTitleList
                }).catch(() => {

                })
            }
        }
    }
</script>

<style scoped>

</style>